package com.xxx.demo.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 客户表
 * @TableName customer_table
 */
@TableName(value ="customer_table")
@Data
public class CustomerPageVo implements Serializable {
    /**
     * 用户id
     */
    private Long id;

    private String strId;
    /**
     * 用户姓名
     */
    private String customerName;

    /**
     * 用户昵称
     */
    private String customerNickName;

    /**
     * 密码
     */
    private String customerPwd;

    /**
     * 性别
     */
    private Integer customerSex;

    /**
     * 年龄
     */
    private Integer customerAge;

    /**
     * 电话
     */
    private Integer customerPhone;

    private Integer deleteFlag;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date creationDate;

    /**
     * 备注
     */
    private String remark;

    private String registerTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CustomerPageVo other = (CustomerPageVo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
            && (this.getCustomerNickName() == null ? other.getCustomerNickName() == null : this.getCustomerNickName().equals(other.getCustomerNickName()))
            && (this.getCustomerPwd() == null ? other.getCustomerPwd() == null : this.getCustomerPwd().equals(other.getCustomerPwd()))
            && (this.getCustomerSex() == null ? other.getCustomerSex() == null : this.getCustomerSex().equals(other.getCustomerSex()))
            && (this.getCustomerAge() == null ? other.getCustomerAge() == null : this.getCustomerAge().equals(other.getCustomerAge()))
            && (this.getCustomerPhone() == null ? other.getCustomerPhone() == null : this.getCustomerPhone().equals(other.getCustomerPhone()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
        result = prime * result + ((getCustomerNickName() == null) ? 0 : getCustomerNickName().hashCode());
        result = prime * result + ((getCustomerPwd() == null) ? 0 : getCustomerPwd().hashCode());
        result = prime * result + ((getCustomerSex() == null) ? 0 : getCustomerSex().hashCode());
        result = prime * result + ((getCustomerAge() == null) ? 0 : getCustomerAge().hashCode());
        result = prime * result + ((getCustomerPhone() == null) ? 0 : getCustomerPhone().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customer_name=").append(customerName);
        sb.append(", customer_nick_name=").append(customerNickName);
        sb.append(", customer_pwd=").append(customerPwd);
        sb.append(", customer_sex=").append(customerSex);
        sb.append(", customer_age=").append(customerAge);
        sb.append(", customer_phone=").append(customerPhone);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}